package com.example.qimo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.qimo.dao.Permission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface PermissionMapper extends BaseMapper<Permission> {
//    @Select("select b.permit_name,b.id " +
//            "from auth a left join permission b on a.permit_id =  b.id " +
//            "where a.role_id=#{roleId}")
    List<Permission> permissionList(@Param("roleId") int roleId);//根据角色获取权限
}
